#include "Frame.h"
#include <stdio.h>
#include <assert.h>
#include <iostream>

using namespace std;

Frame::Frame()
{
}

Frame::Frame(Frame* &packet)
{
    cout << packet << endl;
    assert(packet);
    cout << "made it here" << endl;
    cout << packet << endl;
    sender = packet->getSender();
    destinationer = packet->getDestinationer();
    frameType = packet->getFrameType();
    sprintf(message, "%s", packet->getMessage());
    cout << "made it here too" << endl;
}

Frame::Frame(int who, int dest, int fType, char msg[])
{
    sender = who;
    destinationer = dest;
    frameType = fType;
    sprintf(message, "%s", msg);
}

int Frame::getSender()
{
    return sender;
}

int Frame::getDestinationer()
{
    return destinationer;
}

int Frame::getFrameType()
{
    return frameType;
}

char* Frame::getMessage()
{
    return message;
}

void Frame::setSender(int who)
{
    sender = who;
}

void Frame::setDestinationer(int dest)
{
    destinationer = dest;
}

void Frame::setFrameType(int fType)
{
    frameType = fType;
}

void Frame::setMessage(char msg[])
{
    sprintf(message, "%s", msg);
}

